import json
import re
from curl_cffi import requests


# url = "https://weibo.com/ajax/side/hotSearch"
#
# headers = {
#     "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
#     "referer": "https://weibo.com/"
# }
# response = requests.get(url, headers=headers,impersonate=requests.BrowserType.chrome100)
#
# # print(response.json())
# for item in response.json()['data']['realtime']:
#     print(item)
#

# url = "https://weibo.com/ajax/feed/hottimeline?since_id=0&refresh=0&group_id=102803&containerid=102803&extparam=discover%7Cnew_feed&max_id=0&count=10"
#
# headers = {
#     "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
#     "referer": "https://weibo.com/"
# }
# response = requests.get(url, headers=headers,impersonate=requests.BrowserType.chrome100)
# print(response.text)